#!/usr/bin/env bash
today=$(date +%Y%m%d_%H%M%S)
profile="${HOME}/profile"
if [ ! -f "$profile" ]; then
    echo "生产备份"
    mongodump -h 10.10.10.4:3000 -d qingdian -o ~/mongo_bak_prod/${today}/
else
    echo "测试备份"
    mongodump -h 10.10.6.3:3000 -d qingdian -o ~/mongo_bak_test/${today}/
fi